//
//  WD_RecomCollectionViewCell.m
//  BUDING
//
//  Created by HanWoonYong on 16/4/3.
//  Copyright © 2016年 HanWoonYong. All rights reserved.
//

#import "WD_RecomCollectionViewCell.h"

@implementation WD_RecomCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.picture = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height - 50)];
        [self.contentView addSubview:self.picture];
        
        self.message = [[UILabel alloc] initWithFrame:CGRectMake(0, self.picture.frame.size.height, self.bounds.size.width, 50)];
        self.message.numberOfLines = 2;
        [self.contentView addSubview:self.message];
        
    }
    
    return self;
}

- (void)setRecomEpsModel:(WD_RecomEpsModel *)recomEpsModel {
    _recomEpsModel = recomEpsModel;
    [self.picture sd_setImageWithURL:[NSURL URLWithString:[recomEpsModel.image objectForKey:@"url"]]];
    self.message.text = recomEpsModel.title;

}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
